package com.haoniu.share.domain;

import java.io.Serializable;
import java.util.Map;

/**
 * @author shrimpBalls
 * @Date2022/7/17 21:13
 * 概要：
 * 这是一个类
 */
public class Result implements Serializable {
    private String message;
    private Map<String, Object> map;

    public static Result error(String message) {
        return new Result(message);
    }


    public static Result ok(Map<String, Object> map) {
        return new Result(map);
    }


    @Override
    public String toString() {
        return "Result{" +
                "message='" + message + '\'' +
                ", map=" + map +
                '}';
    }

    public Result() {
    }

    public Result(String message, Map<String, Object> map) {
        this.message = message;
        this.map = map;
    }

    public Result(String message) {
        this.message = message;
    }

    public Result(Map<String, Object> map) {
        this.map = map;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Map<String, Object> getMap() {
        return map;
    }

    public void setMap(Map<String, Object> map) {
        this.map = map;
    }
}
